<?php

namespace frontend\models;

use Yii;

/**
 * This is the model class for table "dm_nha_cung_cap".
 *
 * @property integer $id
 * @property string $ma
 * @property string $ten
 * @property string $mst
 * @property string $dia_chi
 * @property integer $tinh_tp_id
 * @property string $dien_thoai
 * @property string $fax
 */
class DmNhaCungCap extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'dm_nha_cung_cap';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['ma', 'ten', 'mst', 'dia_chi'], 'required'],
            [['tinh_tp_id'], 'integer'],
            [['ma'], 'string', 'max' => 10],
            [['ten'], 'string', 'max' => 200],
            [['mst'], 'string', 'max' => 14],
            [['dia_chi'], 'string', 'max' => 300],
            [['dien_thoai', 'fax'], 'string', 'max' => 15]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'ma' => 'Ma',
            'ten' => 'Ten',
            'mst' => 'Mst',
            'dia_chi' => 'Dia Chi',
            'tinh_tp_id' => 'Tinh Tp ID',
            'dien_thoai' => 'Dien Thoai',
            'fax' => 'Fax',
        ];
    }
}
